package com.sigmazero13.MKDummy.models;

import android.graphics.Color;

public enum ManaColor {
	RED("Red","RR",Color.RED,true),
	GREEN("Green","GG",Color.GREEN,true),
	BLUE("Blue","BB",0xFF4444FF,true),
	WHITE("White","WW",Color.WHITE,true),
	WOUND("Wound","XX",0xFFA03000,false),
	GOLD("Gold","YY",0xFFFFFF00,false),
	BLACK("Black","ZZ",0xFF555555,false);
	
	String text;
	String code;
	int color;
	boolean basic;
	
	private ManaColor(String text, String code, int color, boolean basic) {
		this.text = text;
		this.code = code;
		this.color = color;
		this.basic = basic;
	}
	
	public String toString() {
		return text;
	}
	
	public CharSequence toColorString() {
		return toColorString("");
	}
	
	public CharSequence toColorString(String extra) {
		if (extra == null) extra = "";
		extra = extra.trim();
		if (!extra.equals("")) extra = " " + extra;
		String colorTag = "#" + code + "#";
		CharSequence returnVal = colorTag + text + extra + colorTag;
		return returnVal;
	}
	
	public String getCode() {
		return code;
	}
	
	public Integer getColor() {
		return color;
	}
	
	public boolean isBasic() {
		return basic;
	}
}